<<<<<<< HEAD:js/common.js
console.info("====common.js=====")
=======
console.info("====backgrand===222=111=")
>>>>>>> eb75189798d7a6ec82246d3066280260d2da8905:common.js

// 显示错误信息
const showMsg = (msg) => {
	let myDate = new Date();
	let now = myDate.toLocaleString();
	console.log(now + "【" + msg + "】");
};
// 拼接相对路径及cdn
const concatUrl = (url, domain) => {
	let fullPath = url
	if (/^\/[^\/]+/.test(url)) { // 是否为相对路径
		fullPath = domain + url
	}
	if (/^\/\//.test(url)) { // 是否为cdn
		fullPath = 'http:' + url
	}
	return fullPath
}


chrome.runtime.onMessage.addListener(function(message, sender, sendResponse){
    if(message == 'Hello'){
        sendResponse('Hello from background.');
    }
});
